//
//  MCConstants.h
//  meets-ios
//
//  Created by Mark on 15/10/23.
//  Copyright © 2015年 meets. All rights reserved.
//

#import <Foundation/Foundation.h>

extern const NSInteger kFooterDisappearCount;

// 用户关系
typedef NS_ENUM (int, RelationType) {
    RelationTypeNormal    = 0,  // 陌生人
    RelationTypeFollowHim = 1,  // 关注他
    RelationTypeBlock     = 2,  // 黑名单
    RelationTypeFriend    = 3,  // 朋友
    RelationTypeMyFans    = 4,  // 我的粉丝
    RelationTypeUnGet     = 99
};

// 验证类型
typedef NS_ENUM(int, AuthType) {
    AuthTypeFacebook      = 0,  // Facebook验证
    AuthTypeMobile        = 1   // 电话验证
};

// 用户关系操作
typedef NS_ENUM (int, RelationOp) {
    RelationOpNONE          = 0, //什么都不是。
    RelationOpFOLLOW_ADD    = 1, // 加关注
    RelationOpFOLLOW_REMOVE = 2, // 移除关注
    RelationOpBLOCK_ADD     = 3, // 加入黑名单
    RelationOpBLOCK_REMOVE  = 4 // 移除黑名单
};

// 地理位置隐私
typedef NS_ENUM (NSInteger, LocationPrivacyType) {
    LocationPrivacyTypeUnknown = 0,
    LocationPrivacyTypePublic  = 1,
    LocationPrivacyTypePrivate = 2
};

// 年龄过滤
typedef NS_ENUM (int, AgeFilter) {
    AGE_BETWEEN_18_22 = 1,
    AGE_BETWEEN_23_26 = 2,
    AGE_BETWEEN_27_35 = 3,
    AGE_LARGER_35     = 4,
    AGE_ALL           = 5
};

// 时间过滤
typedef NS_ENUM (int, TimeFilter) {
    LESS_THAN_ONE_HOUR  = 1,
    LESS_THAN_ONE_DAY   = 2,
    LESS_THAN_THREE_DAY = 3, // 3天
    TimeFilterALL       = 4
};

// conv的类型
typedef NS_ENUM (int, ConvType) {
    ConvTypeSingle          = 0x01, // 单人
    ConvTypeGroup           = 0x10, // 群聊
    ConvTypeSysNotice       = 0x11, // 系统通知
    ConvTypeStrangerOutside = 0x100, // 陌生人HI一栏
    ConvTypeStrangerInSide  = 0x101, // 真正的陌生人
    //ConvTypeVipOutside      = 0x110, // VIP HI一栏
    ConvTypeTop             = 0x1000
};

typedef NS_ENUM (NSInteger, PanelType) {
    PanelAudio     = 0,
    PanelPicture   = 1,
    PanelVideo     = 2,
    PanelGift      = 3,
    PanelTranslate = 4
};

typedef NS_ENUM (NSUInteger, UserType) {
    Other  = 0,
    MySelf = 1
};

typedef NS_ENUM (NSInteger, ProfileDetail) {
    ProfileUnknown = 0,
    ProfileMicoId,
    ProfileAboutMe,
    ProfileAudio,
    ProfileLanguage,
    ProfileHomeTown,
    ProfileCurrentPlace,
    ProfileLabel,
    ProfileSchool,
    ProfileLoveStatus,
    ProfileFrequentPlace,
    ProfileRelation,
    ProfileAuthentication,
    ProfileRegisterTime,
    ProfileGift,
    ProfileBalance,
    ProfileAdvert
};

// 上传文件类型
typedef NS_ENUM (NSUInteger, UploadFileType) {
    UploadFileNormal,
    UploadFileAvatar     = 1,
    UploadFileAudioIntro = 2,
    UploadFileLog        = 3,
};

// Chat消息的类型
typedef NS_ENUM (NSInteger, ChatType) {
    ChatTypeUnknown   = 0,   // 未知
    ChatTypePicFile   = 1,   // 图片消息
    ChatTypeVoice     = 2,   // 语音消息
    ChatTypeDocFile   = 3,   // 文件类型的消息
    ChatTypeVideoFile = 4,   // 短视频
    ChatTypeLocate    = 5,   // 地理位置信息
    ChatTypeUserCard  = 6,   // 用户名片
    ChatTypeAppCard   = 7,   // 第三方信息的card
    ChatTypeSys       = 10,   // 系统消息
    ChatTypeTips      = 11,
    ChatTypeText      = 12,   // 纯文本消息
    ChatTypePaster    = 13,   // 贴纸消息

    //Card分类，30~50
    ChatTypeCardT1 = 31,
    ChatTypeCardT2 = 32,
    ChatTypeCardT3 = 33,
    ChatTypeCardT4 = 34,

    // 其他消息类型
    ChatTypeFollowMe  = 51, // 提醒对方关注
    ChatTypeShareFeed = 52, // 分享动态
    ChatTypeShareUser = 53, // 分享用户
    ChatTypeSayHi     = 54, // 用户系统级别打招呼

    ChatTypeReplyToShareWithText   = 55,
    ChatTypeReplyToShareWithPaster = 56,
    ChatTypeLocalSayHiTips         = 57,
    
    //礼物
    ChatTypeGift = 59,
    //送VIP
    ChatTypeSendVip = 60,

    // 关系变更提示
    ChatTypeRelationOp = 100,
    
    // 推荐paster
    ChatTypeRecommendPaster = 110
};

typedef NS_ENUM(NSInteger, ChatTipsType) {
    ChatTipsTypeUnknown = 0,
    ChatTipsTypeTranslation = 1
};


extern NSString *const MCChatTypeRelationChangeExtValue;
extern NSString *const MCChatTypeVideoFileExtValue;
extern NSString *const MCChatTypeUserCardExtValue;
extern NSString *const MCChatTypePicFileExtValue;
extern NSString *const MCChatTypeDocFileExtValue;
extern NSString *const MCChatTypeLocateExtValue;
extern NSString *const MCChatTypeSystemExtValue;
extern NSString *const MCChatTypePasterExtValue;
extern NSString *const MCChatTypeCardT1ExtValue;
extern NSString *const MCChatTypeCardT2ExtValue;
extern NSString *const MCChatTypeCardT3ExtValue;
extern NSString *const MCChatTypeCardT4ExtValue;
extern NSString *const MCChatTypeVoiceExtValue;
extern NSString *const MCChatTypeTextExtValue;

extern NSString *const MCChatTypeFollowMeExtValue;
extern NSString *const MCChatTypeShareFeedExtValue;
extern NSString *const MCChatTypeShareUserExtValue;
extern NSString *const MCChatTypeSayHiExtValue;
extern NSString *const MCChatTypeReplyShareWithTextExtValue;
extern NSString *const MCChatTypeReplyShareWithPasterExtValue;
extern NSString *const MCChatTypeGiftValue;

//枚举转换
#define kMCConvertChatTypeToEnum(string) ([[[MCConstants MCChatTypeEnumDic] valueForKey:string] unsignedIntegerValue])
#define KMCConvertChatTypeToString(type) ([[[MCConstants MCChatTypeEnumDic] allKeysForObject:[NSNumber numberWithUnsignedInteger:type]] lastObject])

// Chat消息的状态
typedef NS_ENUM (int, ChatStatus) {
    ChatStatusSendSucc     = 0x01,
    ChatStatusSendFail     = 0x02,
    ChatStatusSending      = 0x10,
    ChatStatusRecvUnreaded = 0x18,
    ChatStatusRecvReaded   = 0x19,
    ChatStatusSendReaded   = 0x20
};

// Chat的方向
typedef NS_ENUM (int, ChatDirection) {
    ChatDirectionSend = 1,
    ChatDirectionRecv = 2,
    ChatDirectionSys  = 3
};

typedef NS_ENUM (NSInteger, Gendar) {
    GendarUnknown = 0,
    GendarFemale  = 1,
    GendarMale    = 2,
    GendarAll     = 3
};

typedef NS_ENUM (NSUInteger, LoveStatus) {
    LoveStatusUnknown     = 0,
    LoveStatusSingle      = 1,
    LoveStatusMarried     = 2,
    LoveStatusIntercourse = 3,
    LoveStatusSecrect     = 4
};

// MainTab
typedef NS_ENUM (NSInteger, MainTabType) {
    MainTabNearby   = 0,
    MainTabDiscover = 1,
    MainTabConv     = 2,
    MainTabMe       = 3
};

// SignUpType
typedef NS_ENUM (NSInteger, SignUpType) {
    SignUpTypeUnknown = 0,
    SignUpTypeEmail   = 1,
    SignUpTypeSocial  = 2,
    SignUpTypeMicoId  = 3
};

// SocialLoginType
typedef NS_ENUM (NSInteger, SocialLoginType) {
    SocialLoginTypeWeibo    = 1,
    SocialLoginTypeTencent  = 2,
    SocialLoginTypePhone    = 3,
    SocialLoginTypeGoogle   = 4,
    SocialLoginTypeFacebook = 5,
    SocialLoginTypeTwitter  = 6
};

// DiscoverType
typedef NS_ENUM (NSInteger, DiscoverType) {
    DiscoverUnknown = 0,
    DiscoverMoment  = 1,
    DiscoverFeature = 2,
    DiscoverFresh   = 3,
    DiscoverRoam    = 4
};

// FunctionType
typedef NS_ENUM (NSInteger, FunctionType) {
    FunctionUnknown         = 0,
    FunctionMyFeed          = 1,
    FunctionLikeReceived    = 2,
    FunctionCommentReceived = 3,
    FunctionContact         = 4,
    FunctionVisitors        = 5,
    FunctionVipCenter       = 6,
    FunctionSticker         = 7,
    FunctionAccountBind     = 8,
    FunctionShare           = 9,
    FunctionSetting         = 10,
    FunctionCoinsCenter     = 11,
    FunctionFeedBack        = 12,
    FunctionHelpCenter      = 13
};

// FeedVisible
typedef NS_ENUM (int, FeedVisible) {
    FeedVisiblePublic  = 1,
    FeedVisiblePrivate = 2,
    FeedVisibleFriend  = 3,
    FeedVisibleDelete  = 4,
    FeedVisibleBanned  = 5,
    FeedVisibleUnknown = 0
};

// FeedType
typedef NS_ENUM (NSInteger, FeedType) {
    FeedTypeUnknown          = 0,
    FeedTypeUpdateLabel      = 1,
    FeedTypeAudio            = 2,
    FeedTypeImage            = 3,
    FeedTypeUpdateSchool     = 4,
    FeedTypeRelationShip     = 5,
    FeedTypeLivedPlaceUpdate = 6,
    FeedTypeEvent            = 7,
    FeedTypeNewVisitors      = 8,
    FeedTypeCard             = 9,
    FeedTypeMyTopPublic      = 101,
    FeedTypeEncourage        = 102
};

// FeedCardType
typedef NS_ENUM (NSUInteger, FeedCardType) {
    FeedCardT1 = 1,
    FeedCardT2 = 2
};

typedef NS_ENUM (NSInteger, ChatShareFeedType) {
    UserShareFeed  = 0,
    PushShareFeed  = 1,
    ReplyShareFeed = 2
};

// ResourceType
typedef NS_ENUM (int, ResourceType) {
    ResourceTypeUNKNOWN = 0,
    ResourceTypeIMAGE   = 1,
    ResourceTypeVIDEO   = 2,
    ResourceTypeAUDIO   = 3
};

// UserStatus 用户状态
typedef NS_ENUM (NSUInteger, UserStatus) {
    UserStatusUNKNOWN   = 0,
    UserStatusNORMAL    = 1,     // 账户正常
    UserStatusBANNED    = 2,     // 账户被封禁
    UserStatusCANCELLED = 3      // 账户被注销
};

// ChatEventType 聊天消息状态
typedef NS_ENUM (int, ChatEventType) {
    ChatEventTypeUnknown              = 0,
    ChatEventTypeReceive              = 1,   // 携带 convId , msgId
    ChatEventTypeSending              = 2,   // 不需要携带任何信息
    ChatEventTypeSendFailedTimeout    = 3,   // 携带 convId , msgId
    ChatEventTypeSendFailedNet        = 4,   // 携带 convId , msgId
    ChatEventTypeSendSucc             = 5,   // 携带 convId , msgId
    ChatEventTypeSetZero              = 6,   // 不需要携带任何信息
    ChatEventTypeResend               = 7,   // msgId
    ChatEventTypeDelete               = 8,   // msgId
    ChatEventTypeSendFailedFileUpload = 9,   // 携带 convId , msgId
    ChatEventTypeMsgRead              = 10,    // msgId
    ChatEventTypeRelationChange       = 11
};

// ChatUIRefreshEventType 聊天局部消息状态刷新
typedef NS_ENUM (int, ChatUIRefreshEventType) {
    ChatUIEventTypeUnknown               = 0,
    ChatUIEventTypeSendImageProgress     = 1,
    ChatUIEventTypeDownloadImageProgress = 2
};


// AppPannelType 聊天消息状态
typedef NS_ENUM (int, AppPannelType) {
    AppPannelTypePhoto   = 1,
    AppPannelTypeCapture = 2,
    AppPannelTypeVideo   = 3,
    AppPannelTypeLocate  = 4
};

typedef NS_ENUM (int, LocateType) {
    LocateTypeDisable = 1,
    LocateTypeAppDeny = 2,
    LocateTypeUnknown = 3,
    LocateTypeError   = 4,
    LocateTypeTimeout = 5,
    LocateTypeSucc    = 6
};

// 举报原因
typedef NS_ENUM (int, ReportType) {
    ReportTypeUNKNOWN   = 0,
    ReportTypeVIOLENCE  = 1,
    ReportTypePORN      = 2,
    ReportTypeCRIME     = 3,
    ReportTypeABUSE     = 4,
    ReportTypePOLITICAL = 5,
    ReportTypeSENSITIVE = 6
};

// 视频的加载类型
typedef NS_ENUM (int, VideoLoadType) {
    VideoLoadTypeLocal  = 1,
    VideoLoadTypeRemote = 2
};

// Notice的类型
typedef NS_ENUM (int, NoticePushType) {
    NoticePushTypeMessage     = 1,
    NoticePushTypeLike        = 100,
    NoticePushTypeComment     = 101,
    NoticePushTypeCircle      = 102,
    NoticePushTypeFollow      = 103,
    NoticePushTypeRateUs      = 104,
    NoticePushTypeFeatureUser = 105,
    NoticePushTypeNewUser     = 106,
    NoticePushTypeNewVisitor  = 107,
    NoticePushTypeNewEmoji    = 108,
    NoticePushTypeUserRecall  = 109,
};

// PasterType的类型
typedef NS_ENUM (int, PasterType) {
    PasterTypeStatic = 1,
    PasterTypeGif    = 2
};

// 支持的距离单位
typedef NS_ENUM (NSUInteger, DistanceUnit) {
    DistanceUnitKm = 0,
    DistanceUnitMi = 1
};

// 支持的语音类型
typedef NS_ENUM (NSUInteger, VoiceType) {
    VoiceTypeSpx = 0,
    VoiceTypeAmr = 1
};

// 苹果设定的商品类型
typedef NS_ENUM (NSUInteger, ProductType) {
    ProductUnknown             = 0,
    Consumable                 = 1,
    NonConsumable              = 2,
    AutorenewableSubscriptions = 3,
    NonRenewableSubscriptions  = 4,
    FreeSubscriptions          = 5
};

// 缩略图尺寸
typedef NS_ENUM (NSUInteger, ThumbnailMeasurement) {
    ThumbnailOld   = 0,
    ThumbnailSmall = 1,
    ThumbnailMid   = 2,
    ThumbnailLarge = 3
};

//动态评论权限
typedef NS_ENUM (NSUInteger, FeedState) {
    FeedAll    = 1,
    FeedFriend = 2,
    FeedFan    = 3
};

// 受限用户类型
typedef NS_ENUM (NSInteger, RestrictedState) {
    RestrictedNoAvatar             = 1,
    RestrictedAvatarWithLessDetail = 2,
    RestrictedAvatarWithMoreDetail = 3,
    RestrictedVip                  = 4,
};

// 礼物类型
typedef NS_ENUM (NSInteger, GiftType) {
    Animals = 1,
    Bling   = 2,
    Cars    = 3,
    Digital = 4,
    Flower  = 5,
    Hearts  = 6,
    Luxury  = 7,
};

// 余额展示类型
typedef NS_ENUM (NSInteger, AmountType) {
    MicoMoneyCenter = 1,
    GigtCenter      = 2,
};

// 用户的礼物类型
typedef NS_ENUM(NSInteger, GiftSourceType) {
    GiftTypeReceived = 0,
    GiftTypeSend = 1
};

//  当前广告页的状态
typedef NS_ENUM(NSInteger, CurrentAdState) {
    CurrentAdLoaded      = 1,
    CurrentAdFrequent    = 2,
    CurrentAdLoading     = 3,
    CurrentAdFailed      = 4
};

// 运营页，展示类型
typedef NS_ENUM(NSInteger, LaunchState) {
    ImageUnknown         = 0,
    staticImageType      = 1,
    scrollImageType      = 2,
};

typedef NS_ENUM(NSInteger, AdSource) {
    AdSourceUnknown  = 0,
    AdSourceFacebook = 1
};

typedef NS_ENUM(NSInteger, AdsPlacement) {
    AdsPlacementNone = 0,
    AdsPlacementNearby,
    AdsPlacementPublicMoment,
    AdsPlacementPersonalMoment,
    AdsPlacementPhotoWall,
    AdsPlacementConvAppDay,
    AdsPlacementGiftBox
};

typedef NS_ENUM(NSInteger, AdUI) {
    AdUIUnknown = 0,
    AdUI_1     = 1,
    AdUI_2     = 2,
    AdUI_3     = 3,
    AdUI_4     = 4,
    AdUI_5     = 5,
    AdUI_6     = 6
};

typedef NS_ENUM(NSInteger, OpUI) {
    OpUIUnknown = 0,
    OpUI_1     = 7,
    OpUI_2     = 8,
    OpUI_3     = 9,
    OpUI_4     = 10,
    OpUI_5     = 11,
    OPUI_6     = 12
};


// 插屏第三方广告类型
typedef NS_ENUM(NSInteger, IntersitialsAdType) {
    AdvertisemtUnknown         = 0,
    AdvertisemtFB              = 1,
};

//插屏广告位置
typedef NS_ENUM(NSInteger, IAdPosition) {
    PositionUnkown          = 0,
    PositionFunctionVC      = 1,
    PositionMeBackVc        = 2,
    PositionUnlimited       = 3
};

// 礼物盒子抽奖类型
typedef NS_ENUM(NSInteger, GiftBoxType) {
    TypeUnknow              = 0,
    AdsView                 = 1,
    VipView                 = 2,
    CoinsView               = 3
};

//feedback类型
typedef NS_ENUM(NSInteger, FeedBackType) {
    FB_Chat_or_Messages           = 1 ,
    FB_Personal_Profile           = 2 ,
    FB_Location                    = 3 ,
    FB_Moments                     = 4 ,
    FB_Photos                      = 5 ,
    FB_Contacts                    = 6 ,
    FB_Notifications               = 7 ,
    FB_Privacy                     = 8 ,
    FB_Payment                     = 9 ,
    FB_Ads                         = 10,
    FB_Abusive_Content             = 11,
    FB_Localization_Translation    = 12,
    FB_Others                      = 13
};

@interface MCConstants : NSObject

+ (NSDictionary *)MCChatTypeEnumDic;

@end